package com.binyouwei.designpatterns.behavior.interpreter;


/**
 * @author 宾有为
 * Created on 2024/7/15 19:22
 * Social homepage: https://blog.csdn.net/baidu_41616022
 * @desc
 **/
public class InterpreterAdditionExpression  extends InterpreterExpression {
    private InterpreterExpression left;
    private InterpreterExpression right;

    public InterpreterAdditionExpression(InterpreterExpression left, InterpreterExpression right) {
        this.left = left;
        this.right = right;
    }

    @Override
    int interpret() {
        return left.interpret() + right.interpret();
    }
}
